<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动态绑定 class 数组语法</title>
    <style>
        .textdecorated {
            text-decoration: underline;
        }

        .colordecorated {
            color: red;
        }
    </style>
</head>
<body>
<div id="app">
    <h1 class="colordecorated textdecorated">Hello, World</h1>

    <h1 v-bind:class="['colordecorated', 'textdecorated']">Hello, World</h1>
    <h1 v-bind:class="abc">Hello, World</h1>
    <h1 v-bind:class="[isColorDecorated, isTextDecorated]">Hello, World</h1>


</div>

<script src="../../../../../js/vue.global.js"></script>
<script>

    const app = Vue.createApp({
        data() {
            return {
                abc: ['colordecorated', 'textdecorated'],
                isColorDecorated: "colordecorated",
                isTextDecorated: "textdecorated"
            }
        }
    })

    app.mount("#app")
</script>
</body>
</html>